<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>replaceState</title>
</head>
<body>
<script>
  window.addEventListener('popstate',(ev)=>{
    console.log('ev:',ev)
  })

  //同pushState, 也会触发popstate
  //区别只在于 它生成的历史页会顶替掉当前这一页的历史 而不是往历史栈中加一层
</script>
</body>
</html>
